package cc.eddic.pratice.programmingparadigms.emp03objlist;

public class StringList extends ObjectList {
    public StringList() {
        super();
    }

    public StringList(int capacity) {
        super(capacity);
    }

    public String get(int index) {
        return (String) super.get(index);
    }

    public void add(String s) {
        super.add(s);
    }

    public String find(StringPredicate predicate) {
        return (String) super.find(new ObjectPredicate() {
            @Override
            public boolean test(Object obj) {
                return predicate.test((String) obj);
            }
        });
    }
}
